package oa.test;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class LoginT {
	
	@Autowired
	LoginServer loginservice;
	
	@RequestMapping("loginT")
	public String index(HttpServletRequest req, HttpServletResponse rep, ModelMap map){
		String username = req.getParameter("username");
		String password = req.getParameter("password");
		System.out.println("controller:");
		
		loginservice.loginCheck();
		
		map.addAttribute("username", username);
		map.addAttribute("password", password);
		return "my";
	}

}
